// 修改密码时相同密码报错对话框显示

// 关闭VSCode非必要报错
// ignore_for_file: camel_case_types, sized_box_for_whitespace

import 'package:flutter/material.dart';
import 'package:project_award_statistics/utils/my_yaru_buttons/my_yaru_button_error_info.dart';
import 'package:yaru/yaru.dart';

class DialogChangePasswdErr_SamePasswd_Desktop extends StatelessWidget {
  const DialogChangePasswdErr_SamePasswd_Desktop({super.key});

  @override
  Widget build(BuildContext context) {
    return AlertDialog(
      backgroundColor: Theme.of(context).colorScheme.surface,
      titlePadding: EdgeInsets.all(0),
      title: YaruDialogTitleBar(   // 设置对话框最上面登录错误的那一栏样式
        isClosable: false,
        title: Text(
          "登录错误",
          style: TextStyle(
            fontSize: 19,
            fontWeight: FontWeight.bold,
          ),
        ),
      ),
      content: Padding(
        padding: const EdgeInsets.only(top:24.0),
        child: Container(
          height: 120,
          width: 480,
          child: Column(
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
            children: [
              Text(
                "您输入的新密码与更改前相同,请更换一个新密码!",
                style: TextStyle(
                  fontSize: 20,
                ),
              ),
              SizedBox(
                height: 45,
                width: 200,
                child: MyYaruButton_ErrorInfo(
                  text: "好的,我马上去检查", 
                  onPressed: ()=>Navigator.of(context).pop(),
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
